<?php include_once 'header.php'; ?>
<style>
.ic{
    margin-right:3px;
}
.notice{
    background: #333;
    color: indianred;
    top: 47px;
    padding-left: 10px;
    height: 29px;
    position: fixed;
    display:flex;
    align-items: center;
    width: 100%;
}
marquee{
    color:indianred;
    font-size:14px;
}
</style>
<div class="head clearfix">
    <div class="left">
        <div class="wrapper">
            <i>用户</i>
            <span class="user_body_phone"><?php echo($user->body_phone); ?></span>
        </div>
    </div>
    <div class="right">

                <div class="wrapperb">

            <span> 
            	 <a href="/account/pay">
            	 	<img src="/statics_v2/img/czz.png" width="50" height="24" /></a>  </span>
        </div>
                <div class="wrappera">
            <i>可用余额</i>
            <span class="user_body_balance"><?php echo($user->body_balance); ?> USD</span>
        </div>
    </div>
</div>
<div class="notice">
    <i class="fa fa-bullhorn ic"></i>
    <marquee  direction="left" behavior="scroll" scrollamount="3" height="25" width="100%" loop="-1">
        <div style="width:100%"><?php echo $notice->notice ?></div>
    </marquee>
</div>


<div class="container dashboard" style="top:76px;">
    <table class="dashboard">
        <thead>
            <tr>
                <td width="50%">商品</td>
                <td>买入</td>
                <td>卖出</td>
            </tr>
        </thead>
        <tbody>
<?php foreach ($objects as $item) { ?>
            <tr data-id="<?php echo($item->id); ?>">
                <td><div class="btys"><?php echo($item->body_name); ?> <?php echo($item->body_name_english); ?></div></td>
                <td class="price <?php
                    if($item->body_price_previous > $item->body_price) echo 'green';
                    else echo 'red';  
                ?>"><?php echo(sprintf('%.' . $item->body_price_decimal . 'f', $item->body_price)); ?></td>
                <td class="price <?php
                    if($item->body_price_previous > $item->body_price) echo 'green';
                    else echo 'red';  
                ?>"><?php echo(sprintf('%.' . $item->body_price_decimal . 'f', $item->body_price)); ?></td>
            </tr>
<?php } ?>
        </tbody>
    </table>
</div>

<?php include_once 'footer.php'; ?>
